<template>
  <div id="app">
    <Header />
    <router-view> </router-view>
    <!-- 在登录注册页面隐藏 -->
    <Footer v-show="$route.meta.show" />
  </div>
</template>

<script>
import Footer from "./components/Footer";
import Header from "./components/Header";
export default {
  name: "App",
  components: {
    Header,
    Footer,
  },
  mounted() {
    // 通知vuex发送请求获取数据存储于仓库,存放在App组件中使其只需要发送一次
    this.$store.dispatch("categoryList");
  },
};
</script>

<style>
</style>
